package com.zyd.mappers;

import com.zyd.io.model.SocketNowEntity;
import com.zyd.io.model.SocketNowEntityExample;
import com.zyd.io.model.SocketNowEntityKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface SocketNowEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @SelectProvider(type=SocketNowEntitySqlProvider.class, method="countByExample")
    long countByExample(SocketNowEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @DeleteProvider(type=SocketNowEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(SocketNowEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @Delete({
        "delete from socket_now",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(SocketNowEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @Insert({
        "insert into socket_now (id, event_type, ",
        "base_id, base_version, ",
        "tag_id, tag_version, ",
        "power, bak_1, bak_2, ",
        "bak_3, rec_time, ",
        "forward_time, islock, ",
        "locktime)",
        "values (#{id,jdbcType=BIGINT}, #{event_type,jdbcType=VARCHAR}, ",
        "#{base_id,jdbcType=VARCHAR}, #{base_version,jdbcType=VARCHAR}, ",
        "#{tag_id,jdbcType=VARCHAR}, #{tag_version,jdbcType=VARCHAR}, ",
        "#{power,jdbcType=VARCHAR}, #{bak_1,jdbcType=VARCHAR}, #{bak_2,jdbcType=VARCHAR}, ",
        "#{bak_3,jdbcType=VARCHAR}, #{rec_time,jdbcType=TIMESTAMP}, ",
        "#{forward_time,jdbcType=VARCHAR}, #{islock,jdbcType=INTEGER}, ",
        "#{locktime,jdbcType=VARCHAR})"
    })
    int insert(SocketNowEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @InsertProvider(type=SocketNowEntitySqlProvider.class, method="insertSelective")
    int insertSelective(SocketNowEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @SelectProvider(type=SocketNowEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="event_type", property="event_type", jdbcType=JdbcType.VARCHAR),
        @Result(column="base_id", property="base_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="base_version", property="base_version", jdbcType=JdbcType.VARCHAR),
        @Result(column="tag_id", property="tag_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="tag_version", property="tag_version", jdbcType=JdbcType.VARCHAR),
        @Result(column="power", property="power", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_1", property="bak_1", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_2", property="bak_2", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_3", property="bak_3", jdbcType=JdbcType.VARCHAR),
        @Result(column="rec_time", property="rec_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="forward_time", property="forward_time", jdbcType=JdbcType.VARCHAR),
        @Result(column="islock", property="islock", jdbcType=JdbcType.INTEGER),
        @Result(column="locktime", property="locktime", jdbcType=JdbcType.VARCHAR)
    })
    List<SocketNowEntity> selectByExample(SocketNowEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @Select({
        "select",
        "id, event_type, base_id, base_version, tag_id, tag_version, power, bak_1, bak_2, ",
        "bak_3, rec_time, forward_time, islock, locktime",
        "from socket_now",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="event_type", property="event_type", jdbcType=JdbcType.VARCHAR),
        @Result(column="base_id", property="base_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="base_version", property="base_version", jdbcType=JdbcType.VARCHAR),
        @Result(column="tag_id", property="tag_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="tag_version", property="tag_version", jdbcType=JdbcType.VARCHAR),
        @Result(column="power", property="power", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_1", property="bak_1", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_2", property="bak_2", jdbcType=JdbcType.VARCHAR),
        @Result(column="bak_3", property="bak_3", jdbcType=JdbcType.VARCHAR),
        @Result(column="rec_time", property="rec_time", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="forward_time", property="forward_time", jdbcType=JdbcType.VARCHAR),
        @Result(column="islock", property="islock", jdbcType=JdbcType.INTEGER),
        @Result(column="locktime", property="locktime", jdbcType=JdbcType.VARCHAR)
    })
    SocketNowEntity selectByPrimaryKey(SocketNowEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @UpdateProvider(type=SocketNowEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") SocketNowEntity record, @Param("example") SocketNowEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @UpdateProvider(type=SocketNowEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") SocketNowEntity record, @Param("example") SocketNowEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @UpdateProvider(type=SocketNowEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(SocketNowEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table socket_now
     *
     * @mbg.generated Sat Nov 03 10:50:51 CST 2018
     */
    @Update({
        "update socket_now",
        "set event_type = #{event_type,jdbcType=VARCHAR},",
          "base_id = #{base_id,jdbcType=VARCHAR},",
          "base_version = #{base_version,jdbcType=VARCHAR},",
          "tag_id = #{tag_id,jdbcType=VARCHAR},",
          "tag_version = #{tag_version,jdbcType=VARCHAR},",
          "power = #{power,jdbcType=VARCHAR},",
          "bak_1 = #{bak_1,jdbcType=VARCHAR},",
          "bak_2 = #{bak_2,jdbcType=VARCHAR},",
          "bak_3 = #{bak_3,jdbcType=VARCHAR},",
          "rec_time = #{rec_time,jdbcType=TIMESTAMP},",
          "forward_time = #{forward_time,jdbcType=VARCHAR},",
          "islock = #{islock,jdbcType=INTEGER},",
          "locktime = #{locktime,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(SocketNowEntity record);
}